<template>
  <div>
    <div>
      <button @click="comName = 'UsePao'">第一页跑车</button>
      <button @click="comName = 'UseChe'">第二页跑车</button>
    </div>
    <p>下面显示图片</p>
    <div class="pao">
      <!-- 找到统一挂载点 -->
      <component :is="comName"></component>
    </div>
  </div>
</template>

<script>
// 创建引入注册，被切换的组件
import UsePao from "../components/UsePao";
import UseChe from "../components/UseChe";
export default {
  data() {
    return {
      comName: "UsePao",
    };
  },
  components: {
    UsePao,
    UseChe,
  },
};
</script>

<style>
</style>